package super

import (
	v1 "Project/api/v1"
	"github.com/gin-gonic/gin"
)

type UserSuperRouter struct{}

func (u *UserSuperRouter) InitUserSuperRouter(Router *gin.RouterGroup) {
	userSuperRouter := Router.Group("api/user-super")
	drugShopApi := v1.ApiGroupApp.SuperApiGroup.DrugShopApi     // 超级用户下的药店API
	drugRecordApi := v1.ApiGroupApp.SuperApiGroup.DrugRecordApi // 超级用户下的药品登记记录API
	areaApi := v1.ApiGroupApp.SuperApiGroup.AreaApi             // 超级用户下的区县API
	//userSuperApi := v1.ApiGroupApp.UserApiGroup.SuperApi
	{
		// 药店查询，药店人员查询分组
		drugShop := userSuperRouter.Group("drug-shop")
		drugShop.GET("", drugShopApi.GetAllDrugShop)
		drugShop.GET(":shop_id", drugShopApi.GetDrugUserList)

		// 药品登记记录查询
		drupRecord := userSuperRouter.Group("drug-record")
		drupRecord.GET("", drugRecordApi.GetDrugRecordList)

		// 区县信息管理
		area := userSuperRouter.Group("area")
		{
			area.GET("", areaApi.GetAreaList)
			area.GET("id-list", areaApi.GetAreaIdList)
			area.POST("", areaApi.AddArea)
			area.DELETE(":area_id", areaApi.DeleteArea)
			area.PUT("", areaApi.UpdateArea)
		}
	}
	//SuperUserRouter := Router.Group("api/super")
	//{
	//	// 管理县区用户
	//	SuperUserRouter.GET("area-info")
	//	SuperUserRouter.PUT("area-action")
	//	SuperUserRouter.DELETE("area-del")
	//
	//	// 添加用户
	//	SuperUserRouter.POST("user", userSuperApi.CreateUser)
	//
	//	// 管理超级用户个人信息
	//	SuperUserRouter.GET("super-info", userSuperApi.SuperInfo)
	//	SuperUserRouter.PUT("super-action", userSuperApi.EditorSuperUserInfo)
	//	SuperUserRouter.PUT("password", userSuperApi.EditorPassword)
	//
	//}

}
